package com.polaris.live.dialog.luckybag

import android.content.Context
import com.bumptech.glide.Glide
import com.lxj.xpopup.core.BottomPopupView
import com.polaris.live.R
import com.polaris.live.databinding.DialogLuckyBagDescBinding
import com.polaris.live.utils.image.ImageUtils

/**
 * 福袋规则说明弹窗
 *
 * @author Created by lucas on 2024/6/11 06:37
 * @since 1.0.0
 */
class LuckyBagDescDialog(context: Context) : BottomPopupView(context) {

    private lateinit var mBinding: DialogLuckyBagDescBinding

    override fun getImplLayoutId(): Int {
        return R.layout.dialog_lucky_bag_desc
    }

    override fun onCreate() {
        super.onCreate()
        mBinding = DialogLuckyBagDescBinding.bind(popupImplView)
        mBinding.apply {
            Glide.with(context).load(ImageUtils.imgPath("/static/recharge/luckybag/lucky_bag_rule_1.png"))
                .into(ivDetailIcon1)
            Glide.with(context).load(ImageUtils.imgPath("/static/recharge/luckybag/lucky_bag_rule_2.png"))
                .into(ivDetailIcon2)
            Glide.with(context).load(ImageUtils.imgPath("/static/recharge/luckybag/lucky_bag_rule_3.png"))
                .into(ivDetailIcon3)
            Glide.with(context).load(ImageUtils.imgPath("/static/recharge/luckybag/lucky_bag_rule_4.png"))
                .into(ivDetailIcon4)
            Glide.with(context).load(ImageUtils.imgPath("/static/recharge/luckybag/lucky_bag_rule_5.png"))
                .into(ivDetailIcon5)
            Glide.with(context).load(ImageUtils.imgPath("/static/recharge/luckybag/lucky_bag_rule_6.png"))
                .into(ivDetailIcon6)
            Glide.with(context).load(ImageUtils.imgPath("/static/recharge/luckybag/lucky_bag_rule_7.png"))
                .into(ivDetailIcon7)
            Glide.with(context).load(ImageUtils.imgPath("/static/recharge/luckybag/lucky_bag_rule_8.png"))
                .into(ivDetailIcon8)
            bvView.setOnLeftClientListener {
                dismiss()
            }
        }
    }
}